<?php
 include_once('functions.php');
 $inum=$_GET['n'];
 get_xml();
 $imin=$ran_sort[count($ran_sort)-1];
 $imax=$ran_sort[0];
 if($inum==''){
  $num=$imax;
  include_once'list.php';
 }elseif(($inum>=$imin)&&($inum<=$imax)){
   $num=$inum;
   include_once'page.php';
 }else{
   turn_index();
 }
 
 
 //输出错误跳转页面
 function turn_index(){
   ?>
   <head>
   <title>周刊VOCALOID中文曲排行榜</title>
   <link rel="stylesheet" media="all" href="assets/index.css?body=1" />
   <meta name="robots" content="noindex,nofollow">
   <meta charset="UTF-8"/>
   <style type="text/css">
body{
	background-repeat: no-repeat;
	color: #000;
	font:9pt/200% Verdana;
}
a{text-decoration: none;color:#659B28}
a:hover{text-decoration: underline;}
</style>
   </head>
   <body>
   <div style='padding:30px;padding:36px 80px;border:1px solid #a9a9a9;background:#ffffff ; text-align:center; margin:20% auto; background-repeat: no-repeat; width:55%;'>
<script>
      var pgo=0;
            function JumpUrl(){
            if(pgo==0){ location='/login'; pgo=1; }
        }
document.write("错误喽(ﾟДﾟ≡ﾟдﾟ)!?<p>貌似参数有问题(°∀°)ﾉ");
document.write("<br /><a href='/vcran/index.php'>正在跳转到缓存站首页。如果你的浏览器没反应，请点击这里...</a>");
document.write("<br />也可以点<a hfef='page.php'>这里</a>看看缓存列表哦(｀・ω・´)")
setTimeout('JumpUrl()',3000);
function JumpUrl(){  
  location='index.php';  
}  
</script>
</div>
 </body>
   <?php
 }
 ?>